<?php

/**
 * winbinder 패키지 
 * 
 * 
 * @package php.ui.winbinder
 */

/**
 * AccelItem 클래스
 * 
 * 단축키 설정 후 callback 함수 지정 
 * 
 * @package php.ui.winbinder
 */
class WBAccelItem extends WBObject { 
	
	public function __construct($options = array()) { 
		parent::__construct($options);
	}

	public function getAccelTemplate() { 
		return array($this->getOption('id'), $this->getOption('key'));
	}

	public function initEvent() { 
		parent::initEvent();

		$this->setEvent('click', 'onClick');
	}

	public function fire($eo) { 
		$this->fireEvent('click', $eo);
	}

	public function onClick($eo) { 
		if ($this['callback']) { 
			call_user_func_array($this->getOption('callback'), array($eo));
		}
	}

	
	public function __destruct() { 
		parent::__destruct();
	}
}

?>